<template>
  <div class="router-content">
    <inside v-for="(div, index) in article" :key="index" :title="div.title" :contents="div.contents" :urls="div.urls"></inside>
  </div>
</template>

<script>
import Bus from '@/assets/bus'
import inside from '@/components/inside'
export default {
  name: 'index',
  components: {
    inside
  },
  data () {
    return {
      menus: [],
      article: []
    }
  },
  created () {
    this.menus = this.$route.matched
    Bus.$emit('menus', this.menus)
    // console.log(this.$route.matched)
    this.write()
  },
  methods: {
    write () {
      this.article = [
        {
          title: '食客类别列表',
          contents: [
            '食客类别画面会显示持卡人一级类别和二级类别。'
          ],
          urls: [
            '/static/imgs/base/customerCatagory_1.png'
          ]
        }, {
          title: '创建一级类别',
          contents: [
            '点击“创建”弹出编辑持卡人类型的窗口，能够创建一级食客类别'
          ],
          urls: [
            '/static/imgs/base/customerCatagory_2.png'
          ]
        }, {
          title: '创建二级食客类别',
          contents: [
            '点击“创建子类别”弹出创建二级食客类别的对话框，选择一级类别，填写名称，最后点击提交。',
            ''
          ],
          urls: [
            '/static/imgs/base/customerCatagory_3.png',
            '/static/imgs/base/customerCatagory_4.png'
          ]
        }, {
          title: '改名',
          contents: [
            '点击食客类别页面的“改名”弹出编辑持卡人类型的对话框，改完名后提交就成功改名了。',
            ''
          ],
          urls: [
            '/static/imgs/base/customerCatagory_5.png',
            '/static/imgs/base/customerCatagory_6.png'
          ]
        }, {
          title: '删除',
          contents: [
            '点击食客类别页面的“删除”出现“确认要删除该食客类别吗？”对话框，点击“确定”就成功删除了。',
            ''
          ],
          urls: [
            '/static/imgs/base/customerCatagory_7.png',
            '/static/imgs/base/customerCatagory_8.png'
          ]
        }
      ]
    }
  }
}
</script>
<style>
</style>
